Skip to main content

SPARQL Quiz

The following are the questions and related SPARQL queries used for our quiz during the workshop.

Try them out

Copy, and try running the queries at https://sparql.unhide.helmholtz-metadaten.de/

1. How many affiliation has the person with the most affiliations in the HKG

Answer: 19 (on April 27th 2026)

Details
PREFIX schema: <https://schema.org/>
SELECT ?person ?personName (COUNT(DISTINCT ?org) AS ?centerCount)
WHERE {
?person a schema:Person ;
schema:name ?personName ;
schema:affiliation ?org .
?org schema:identifier ?ror .
FILTER(CONTAINS(STR(?ror), "ror.org"))
}
GROUP BY ?person ?personName
HAVING (COUNT(DISTINCT ?org) > 1)
ORDER BY DESC(?centerCount)
Limit 1

2. What percentage of publications happen in January?

Answer: 21.27% (on April 27th 2026)

Details
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <https://schema.org/>
SELECT ?month ?monthCount ?validDateTotal ((?monthCount * 100.0 / ?validDateTotal) AS ?percentage) WHERE {
{
SELECT (COUNT(DISTINCT ?workTotal) AS ?validDateTotal) WHERE {
?workTotal rdf:type schema:CreativeWork .
?workTotal schema:datePublished ?dateTotal .
FILTER (REGEX(STR(?dateTotal),"^[0-9]{4}-[0-9]{2}-[0-9]{2}"))
}
}
{
SELECT ?month (COUNT(DISTINCT ?workMonth) AS ?monthCount) WHERE {
?workMonth rdf:type schema:CreativeWork .
?workMonth schema:datePublished ?dateMonth .
FILTER (REGEX(STR(?dateMonth),"^[0-9]{4}-[0-9]{2}-[0-9]{2}"))
BIND (SUBSTR(STR(?dateMonth),6,2) AS ?month)
}
GROUP BY ?month
}
}
ORDER BY ?month

3.How many digital assets in the HKG have more than 10 contributors?

Answer: 137.416 (on April 27th 2026)

Details
PREFIX schema: <https://schema.org/>
SELECT (COUNT(DISTINCT ?entity) AS ?largeCollaborationCount) WHERE {
{
SELECT ?entity (COUNT(DISTINCT ?contributor) AS ?contributorCount) WHERE {
?entity a ?type .
FILTER (?type IN (schema:Dataset, schema:SoftwareSourceCode, schema:ScholarlyArticle, schema:CreativeWork))
?entity (schema:author | schema:creator | schema:contributor) ?contributor .
}
GROUP BY ?entity
HAVING (COUNT(DISTINCT ?contributor) > 10)
}
}